package com.yu.controller.testExcel;

import com.yu.common.excel.ExcelCommon;
import com.yu.config.result.BackResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;

@Api("测试excel的导入")
@RestController
public class ExcelController {

    private ExcelCommon excelCommon;

    @ApiOperation("导出测试")
    @RequestMapping("/exportExcel")
    public BackResult testExcel(HttpServletResponse response) {
//        ExportParams exportParams = new ExportParams();
//        //exportExcel  三个参数：1  是输出流  2是要输出的excel实体类，3是数据库查出的list
//        Workbook sheets = ExcelExportUtil.exportExcel(exportParams, NUll.class, dictModelExcelVOS);
//        String fileName = "字典_" + DateTimeFormatter.ofPattern("yyyyMMddHHmmss").format(LocalDateTime.now())+".xlsx";
//        excelCommon.downLoadExcel(fileName,response,sheets);
        return null;
    }


}
